home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / callback.001 / callback~ / callback / lib / dgroup / lookgroup.c < prev    next >
C/C++ Source or Header  |  1996-07-18  |  376b  |  19 lines

  1.  
  2. #include "dgroup.p"
  3.  
  4. unsigned lookgroup(char *group)
  5. {
  6.     int
  7.     index;
  8.  
  9.     for (index = 0; index < ndgroupnames; index++)
  10.     {
  11.     if (!strcmp(group, dgroupvector[index]))/* names match ? */
  12.         return (index);            /* then return its index */
  13.     }
  14.     log(log_off, "lookgroup(): Can't find group %s", group);
  15.     parse_error();
  16.  
  17.     return (index);                /* group not found */
  18. }
  19.